<script setup lang="ts">
const props = defineProps<{
    modelValue: number
}>()
// 
const emits = defineEmits<{
    'update:modelValue': [val: number]
}>()
const onInput = (Event: Event) => {
    emits('update:modelValue', Number((Event.target as HTMLInputElement).value))
}
</script>
<template>
    <button @click="emits('update:modelValue', props.modelValue - 1)">- </button>
    <input type="text" :value="modelValue" @input="onInput" />
    <button @click="emits('update:modelValue', props.modelValue + 1)">+ </button>
</template>